/* 
 * 全局基础样式
 * 这个文件会被加载到全局，只放非常基础的重置样式
 * 具体的UI样式应该在global.scss中定义
 */

/* 全局样式重置和规范 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

/* 基础布局样式 */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* 导航栏样式 */
.main-header {
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-title {
  color: #1976d2;
  font-size: 1.6rem;
  font-weight: 700;
}

.header-left {
  display: flex;
  align-items: center;
}

.logo {
  margin-right: 2rem;
  text-decoration: none;
}

.main-nav {
  display: flex;
}

.nav-item {
  padding: 0 1rem;
  height: 70px;
  display: flex;
  align-items: center;
  color: #333;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
  text-decoration: none;
}

.nav-item:hover, .nav-item.router-link-active {
  color: #1976d2;
}

.nav-item.router-link-active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #1976d2;
}

/* 主页样式 */
.hero-section {
  height: 500px;
  background: linear-gradient(135deg, #4a71ba, #7c32a1);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  z-index: 2;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.search-box {
  display: flex;
  margin-bottom: 1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.search-input {
  flex-grow: 1;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-top: 1rem;
}

.tags-label {
  margin-right: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

.quick-tag {
  margin: 0 0.25rem 0.25rem 0;
  cursor: pointer;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
}

.quick-tag:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 数据统计区域 */
.stats-section {
  background-color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
}

.stats-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #1976d2;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: #757575;
  font-size: 1rem;
}

/* 部分标题样式 */
.section {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.5rem;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  position: relative;
  padding-bottom: 0.5rem;
}

.hot-jobs-section {
  margin: 3rem auto;
}

/* 热门职位卡片样式 */
.job-carousel .el-carousel__item {
  border-radius: 8px;
}

.job-carousel {
  margin-bottom: 3rem;
}

.featured-job-card {
  background-color: white;
  height: 100%;
  width: 100%;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  text-align: left;
  margin: 0;
}

.featured-job-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.featured-job-card .company-logo {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 15px;
}

.featured-job-card .logo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1976d2;
  background-color: #e3f2fd;
  border-radius: 8px;
}

.featured-job-card .job-title {
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.4;
  color: #333;
  margin-bottom: 8px;
  width: 100%;
}

.featured-job-card .company-name {
  font-size: 1rem;
  color: #757575;
  margin-bottom: 15px;
  width: 100%;
}

.featured-job-card .job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  width: 100%;
}

.featured-job-card .job-tags .el-tag {
  margin: 0;
  font-size: 0.8rem;
  padding: 0 10px;
  height: 24px;
  line-height: 24px;
}

.featured-job-card .job-salary {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ff4081;
  margin: 10px 0 15px;
  width: 100%;
}

.featured-job-card .job-highlights {
  width: 100%;
  margin-top: 15px;
  margin-bottom: 20px;
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
}

.featured-job-card .highlight-title {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 10px;
  color: #333;
}

.featured-job-card .highlight-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.featured-job-card .highlight-tags .el-tag {
  background-color: #f5f7fa;
  color: #5a6c84;
  border: none;
  font-size: 0.75rem;
  padding: 0 8px;
  height: 24px;
  line-height: 24px;
}

.featured-job-card .apply-btn {
  width: 100%;
  margin-top: auto;
  padding: 10px;
}

/* 推荐职位列表样式 */
.job-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}

.job-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 150px;
}

.job-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.job-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  margin-bottom: 10px;
}

.job-item-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.job-item-salary {
  font-size: 1rem;
  font-weight: 600;
  color: #ff4081;
  white-space: nowrap;
  text-align: right;
}

.job-item-company {
  width: 100%;
  color: #757575;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.job-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.job-item-tags .el-tag {
  margin: 0;
  font-size: 0.75rem;
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
}

/* Element Plus 轮播样式覆盖 */
.el-carousel__item {
  border-radius: 8px;
}

.el-carousel--card .el-carousel__item {
  border-radius: 8px;
}

.el-carousel__container {
  padding-bottom: 20px;
}

.home-page .el-carousel__indicators {
  bottom: -10px;
}

.el-carousel__arrow {
  background-color: rgba(25, 118, 210, 0.8);
}

.el-carousel__arrow:hover {
  background-color: rgba(25, 118, 210, 1);
}

/* 设置轮播卡片内容样式 */
.el-carousel--card .el-carousel__item.is-active {
  transform: translateY(-5px) scale(1.05) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

/* 招聘会样式 */
.job-fair-section {
  margin-top: 3rem;
}

.job-fair-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.job-fair-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.job-fair-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.fair-poster {
  position: relative;
}

.fair-poster img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.fair-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  background-color: white;
  color: #757575;
}

.fair-status.upcoming {
  color: #2196f3;
}

.fair-content {
  padding: 1.5rem;
}

.fair-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

/* 求职指南样式 */
.guide-section {
  margin-top: 3rem;
}

.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.guide-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.guide-image img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.guide-content {
  padding: 1.5rem;
}

.guide-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #333;
}

/* 添加home-page作用域样式 */
.home-page .section {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}

.home-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.home-page .section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #333;
  position: relative;
}

.home-page .section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #1976d2;
}

.home-page .hot-jobs-section {
  margin-top: 3rem;
}

.home-page .el-carousel__item {
  overflow: hidden;
  border-radius: 8px;
}

.home-page .featured-job-card {
  height: 100%;
  width: 100%;
}

/* 热门职位轮播样式修复 */
.el-carousel--card {
  padding-top: 20px;
  padding-bottom: 40px;
  width: 100%;
}

.el-carousel--card .el-carousel__item {
  border-radius: 8px;
  width: 100% !important;
}

.el-carousel--card .el-carousel__container {
  height: 400px !important;
}

.el-carousel--card .el-carousel__item:not(.is-active) {
  cursor: pointer;
  transform: scale(0.95);
}

/* 热门职位标题样式 */
.hot-jobs-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 0 0.5rem;
}

.hot-jobs-section .section-title {
  position: relative;
  padding-bottom: 0.5rem;
}

.hot-jobs-section .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: #1976d2;
}

@media (max-width: 1200px) {
  .job-list {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hot-jobs-section,
  .job-fair-section,
  .guide-section {
    padding: 0 1rem;
  }
  
  .featured-job-card .job-title {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .job-list {
    grid-template-columns: 1fr;
  }
  
  .job-carousel .el-carousel__container {
    height: 450px !important;
  }
  
  .featured-job-card {
    padding: 1rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* 卡片内容边距优化 */
.featured-job-card .company-logo,
.job-item .company-logo {
  margin-bottom: 15px;
}

.featured-job-card .logo-placeholder {
  font-size: 1.5rem;
  color: #1976d2;
}

/* 修复轮播组件 */
.hot-jobs-section .el-carousel {
  width: 100%;
}

.hot-jobs-section .el-carousel--card {
  padding: 20px 0 40px 0;
}

.el-carousel--card .el-carousel__container {
  height: 380px !important;
}

.el-carousel--card .el-carousel__item {
  transition: all 0.4s ease;
}

.job-carousel .el-carousel__indicators--outside {
  padding: 0;
  bottom: 0;
}

/* 修复网格布局 */
.job-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 20px;
}

/* 确保推荐职位卡片高度一致 */
.job-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  min-height: 150px;
}
